
#include <string.h>
#include <assert.h>

#include "raise.h"
#include "container.h"

BEGIN_CLASS(Container);
END_CLASS(Container);

IMPL_CLASS(Container, NULL,
           NULL, NULL, NULL, // ctor, dtor, str
           NULL, NULL, NULL, NULL, // add, sub, mul, div
           NULL, NULL, NULL
        );

void push_back(Object* this, ...)
{
    va_list ap;
    va_start(ap, this);
    call_container_method(this, push_back, &ap);
    va_end(ap);
}

void push_front(Object* this, ...)
{
    va_list ap;
    va_start(ap, this);
    call_container_method(this, push_front, &ap);
    va_end(ap);
}

void setitem(Object* this, ...)
{
    va_list ap;
    va_start(ap, this);
    call_container_method(this, setitem, &ap);
    va_end(ap);
}

Object* getitem(Object* this, ...)
{
    va_list ap;
    va_start(ap, this);
    Object* res =  call_container_method(this, getitem, &ap);
    va_end(ap);
    return res;
}

